package wci.frontend.c.tokens;

import wci.frontend.Source;
import wci.frontend.c.CErrorCode;
import wci.frontend.c.CToken;

import static wci.frontend.c.CTokenType.*;

/**
 * CErrorToken
 * 
 * Represents an error
 * 
 * @author Greg Drysdale
 */


public class CErrorToken extends CToken
{

	public CErrorToken(Source source, CErrorCode code, String errorString)
		throws Exception
	{
		super(source);
		
		this.text = errorString;
        this.type = ERROR;
        this.value = code;
	}
	
	/**
     * Do nothing.  Do not consume any source characters.
     * @throws Exception if an error occurred.
     */
    protected void extract()
        throws Exception
    {
    }
	
}